//
// CPSTexturedParticle.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.IStream;

public class CPSTexturedParticle {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CPSTexturedParticle(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CPSTexturedParticle obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CPSTexturedParticle(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public void setTextureIndexScheme(SWIGTYPE_p_NL3D__CPSAttribMakerT_int_t animOrder) {
    nel3dJNI.CPSTexturedParticle_setTextureIndexScheme(swigCPtr, this, SWIGTYPE_p_NL3D__CPSAttribMakerT_int_t.getCPtr(animOrder));
  }

  public SWIGTYPE_p_NL3D__CPSAttribMakerT_int_t getTextureIndexScheme() {
    long cPtr = nel3dJNI.CPSTexturedParticle_getTextureIndexScheme__SWIG_0(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_NL3D__CPSAttribMakerT_int_t(cPtr, false);
  }

  public void setTextureIndex(int index) {
    nel3dJNI.CPSTexturedParticle_setTextureIndex(swigCPtr, this, index);
  }

  public int getTextureIndex() {
    return nel3dJNI.CPSTexturedParticle_getTextureIndex(swigCPtr, this);
  }

  public void setTextureGroup(SWIGTYPE_p_NLMISC__CSmartPtrT_NL3D__CTextureGrouped_t texGroup) {
    nel3dJNI.CPSTexturedParticle_setTextureGroup(swigCPtr, this, SWIGTYPE_p_NLMISC__CSmartPtrT_NL3D__CTextureGrouped_t.getCPtr(texGroup));
  }

  public CTextureGrouped getTextureGroup() {
    long cPtr = nel3dJNI.CPSTexturedParticle_getTextureGroup__SWIG_0(swigCPtr, this);
    return (cPtr == 0) ? null : new CTextureGrouped(cPtr, false);
  }

  public void setTexture(SWIGTYPE_p_CSmartPtrT_NL3D__ITexture_t tex) {
    nel3dJNI.CPSTexturedParticle_setTexture(swigCPtr, this, SWIGTYPE_p_CSmartPtrT_NL3D__ITexture_t.getCPtr(tex));
  }

  public ITexture getTexture() {
    long cPtr = nel3dJNI.CPSTexturedParticle_getTexture__SWIG_0(swigCPtr, this);
    return (cPtr == 0) ? null : new ITexture(cPtr, false);
  }

  public void serialTextureScheme(IStream f) {
    nel3dJNI.CPSTexturedParticle_serialTextureScheme(swigCPtr, this, IStream.getCPtr(f), f);
  }

  public void enumTexs(SWIGTYPE_p_std__vectorT_NLMISC__CSmartPtrT_NL3D__ITexture_t_t dest) {
    nel3dJNI.CPSTexturedParticle_enumTexs(swigCPtr, this, SWIGTYPE_p_std__vectorT_NLMISC__CSmartPtrT_NL3D__ITexture_t_t.getCPtr(dest));
  }

}
